home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000181_andreas@mpa-garching.mpg.de_Thu Jan 27 15:30:34 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  7KB

  1. Received: from ibm-1.mpa-garching.mpg.de by cs.umb.edu with SMTP id AA20441
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 27 Jan 1994 08:33:55 -0500
  3. Received: from localhost (andreas@localhost) by ibm-1.MPA-Garching.MPG.DE (8.6.4/8.6) id OAA37022; Thu, 27 Jan 1994 14:30:34 +0100
  4. Date: Thu, 27 Jan 1994 14:30:34 +0100
  5. From: Andreas Schott <andreas@mpa-garching.mpg.de>
  6. Message-Id: <199401271330.OAA37022@ibm-1.MPA-Garching.MPG.DE>
  7. To: tex-k@cs.umb.edu
  8. Subject: Bugs in Makefile.in and configure(.in)
  9. Reply-To: andreas@mpa-garching.mpg.de (Andreas Schott)
  10.  
  11. Hi Karl, and all UNIX-TeXers
  12.  
  13. The toplevel Makefile.in in web2c-6.0, dvipsk-5.526a and xdvik-1.5
  14. do not properly propagate the pathes to the subdirectories.
  15.  
  16. Here is the patch:
  17.  
  18. ----------------------------------------------------------------
  19. *** Makefile.in.orig    Mon Jan 24 13:39:11 1994
  20. --- Makefile.in Wed Jan 26 12:21:11 1994
  21. ***************
  22. *** 77,89 ****
  23.   # if we are to propagate changes at the top level.
  24.   makeargs = $(MFLAGS) SHELL='$(SHELL)' \
  25.     prefix=$(prefix) exec_prefix=$(exec_prefix) \
  26. !   bindir=$(bindir) libdir=$(libdir) \
  27.     datadir=$(datadir) infodir=$(infodir) includedir=$(includedir) \
  28.     manext=$(manext) mandir=$(mandir) \
  29. !   texprefix=$(texprefix)     mfprefix=$(mfprefix) \
  30.     texinputdir=$(texinputdir) mfinputdir=$(mfinputdir) \
  31.     texpooldir=$(texpooldir)   mfpooldir=$(mfpooldir) \
  32. !   texfontdir=$(texfontdir) \
  33.     psfontdir=$(psfontdir) \
  34.     dvips_prefix=$(dvips_prefix) \
  35.     configdir=$(configdir) \
  36. --- 77,90 ----
  37.   # if we are to propagate changes at the top level.
  38.   makeargs = $(MFLAGS) SHELL='$(SHELL)' \
  39.     prefix=$(prefix) exec_prefix=$(exec_prefix) \
  40. !   bindir=$(bindir) scriptdir=$(scriptdir) libdir=$(libdir) \
  41.     datadir=$(datadir) infodir=$(infodir) includedir=$(includedir) \
  42.     manext=$(manext) mandir=$(mandir) \
  43. !   texmf_prefix=$(texprefix) \
  44.     texinputdir=$(texinputdir) mfinputdir=$(mfinputdir) \
  45. +   fmtdir=$(fmtdir) basedir=$(basedir)
  46.     texpooldir=$(texpooldir)   mfpooldir=$(mfpooldir) \
  47. !   fontdir=$(fontdir) \
  48.     psfontdir=$(psfontdir) \
  49.     dvips_prefix=$(dvips_prefix) \
  50.     configdir=$(configdir) \
  51. ----------------------------------------------------------------
  52.  
  53. Furthermore a hint. If you unpack the tar-files into three different
  54. parallel subdirectories web2c-6.0, dvipsk-5.526a and xdvik-1.5, you
  55. can create everything under web2c-6.0 if you establish the following
  56. two links in web2c-6.0:
  57.   ln -s ../dvipsk-5.526a/dvipsk dvipsk
  58.   ln -s ../xdvik-1.5/xdvik xdvik
  59.  
  60. Next a complain about configure. I generally run configure not
  61. in the source-directory, but use --srcdir. But configure does
  62. not correctly propagate into subdirectories, when doing so.
  63. A great problem arises for kpathsea, where the config.status of
  64. another configure is used. The implicit assumption of srcdir='.'
  65. cannot be simply corrected by editing the srcdir-definition in the
  66. copied file, but one must call the configure in the $srcdir/kpathsea.
  67.  
  68. The following patch should do it:
  69.  
  70. ----------------------------------------------------------------
  71. *** configure.orig      Sun Dec 19 23:31:40 1993
  72. --- configure   Thu Jan 27 12:51:59 1994
  73. ***************
  74. *** 161,172 ****
  75.   
  76.   # Run configure in each program directory that exists, passing all our args.
  77.   for d in $programs; do
  78. !   if test -d $d; then
  79.       # Remember the first program directory we find.
  80.       test -z "$first_program" && first_program=$d
  81.       
  82.       $verbose "Running configure in $d..."
  83. !     (cd $d; $CONFIG_SHELL configure "$@")
  84.     fi
  85.   done
  86.   
  87. --- 161,176 ----
  88.   
  89.   # Run configure in each program directory that exists, passing all our args.
  90.   for d in $programs; do
  91. !   if test -d $srcdir/$d; then
  92.       # Remember the first program directory we find.
  93.       test -z "$first_program" && first_program=$d
  94.       
  95.       $verbose "Running configure in $d..."
  96. !     if test "$srcdir" = '.'; then
  97. !       (cd $d; $CONFIG_SHELL configure "$@")
  98. !     else
  99. !       (test ! -d $d && mkdir $d; cd $d; $CONFIG_SHELL $srcdir/$d/configure "$@")
  100. !     fi
  101.     fi
  102.   done
  103.   
  104. ***************
  105. *** 174,180 ****
  106.   # Generate only a top-level Makefile and c-auto.h in kpathsea, even if
  107.   # the config.status that we copied generates more things (e.g., dvipsk's).
  108.   # The CONFIG_FILES line in the configure script might be more than one line.
  109. ! $verbose "Using $first_program/config.status to configure kpathsea..."
  110.   awk '
  111.   /CONFIG_HEADERS=/   { print "CONFIG_HEADERS=${CONFIG_HEADERS-\"c-auto.h\"}"
  112.                       next }
  113. --- 178,186 ----
  114.   # Generate only a top-level Makefile and c-auto.h in kpathsea, even if
  115.   # the config.status that we copied generates more things (e.g., dvipsk's).
  116.   # The CONFIG_FILES line in the configure script might be more than one line.
  117. ! if test "$srcdir" = '.'; then
  118. !   $verbose "Using $first_program/config.status to configure kpathsea..."
  119. ! fi
  120.   awk '
  121.   /CONFIG_HEADERS=/   { print "CONFIG_HEADERS=${CONFIG_HEADERS-\"c-auto.h\"}"
  122.                       next }
  123. ***************
  124. *** 197,205 ****
  125.     # The file exists and we would not be changing it.
  126.     :
  127.   else
  128. !   rm -f kpathsea/config.status
  129. !   cp conftest.stat kpathsea/config.status
  130. !   (cd kpathsea; $CONFIG_SHELL config.status)
  131.   fi
  132.   rm -f conftest.stat
  133.   
  134. --- 203,217 ----
  135.     # The file exists and we would not be changing it.
  136.     :
  137.   else
  138. !   test ! -d kpathsea && mkdir kpathsea
  139. !   if test "$srcdir" = '.'; then
  140. !     rm -f kpathsea/config.status
  141. !     cp conftest.stat kpathsea/config.status
  142. !     (cd kpathsea; $CONFIG_SHELL config.status)
  143. !   else
  144. !     $verbose "Running configure in kpathsea..."
  145. !     (cd kpathsea; $CONFIG_SHELL $srcdir/kpathsea/configure "$@")
  146. !   fi
  147.   fi
  148.   rm -f conftest.stat
  149.   
  150. ----------------------------------------------------------------
  151.  
  152. The same patch can be used for configure.in but the linenumbers
  153. are different (shifted about 130).
  154.  
  155. Changing the toplevel configure script for kpathsea is not enough.
  156. The Makefile.in in the subdirectories are missing to define the
  157. kpathsea_srcdir_parent as include-direcotry in the CPPFLAGS.
  158.  
  159. Here is the patch for all */Makefile.in:
  160.  
  161. ----------------------------------------------------------------
  162. *** Makefile.in.orig    Mon Jan 24 13:39:10 1994
  163. --- Makefile.in Thu Jan 27 12:32:09 1994
  164. ***************
  165. *** 78,84 ****
  166.   
  167.   # Do not override CPPFLAGS; change CFLAGS or DEFS instead.
  168.   CPPFLAGS = $(XCPPFLAGS) -I. -I$(srcdir) -I$(kpathsea_parent) \
  169. !            $(x_include_flags) $(DEFS) 
  170.   .c.o:
  171.         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
  172.   
  173. --- 78,84 ----
  174.   
  175.   # Do not override CPPFLAGS; change CFLAGS or DEFS instead.
  176.   CPPFLAGS = $(XCPPFLAGS) -I. -I$(srcdir) -I$(kpathsea_parent) \
  177. !            -I$(kpathsea_srcdir_parent) $(x_include_flags) $(DEFS) 
  178.   .c.o:
  179.         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
  180.   
  181. ----------------------------------------------------------------
  182.  
  183. Hope this was correct (at least it now works for me) and is
  184. useful for others, too. But is there no better way to
  185. configure, than to run configure in every subdirectory?
  186.  
  187. Andreas Schott.